package marketing

import (
	"jlpay-sdk-go/pkg/jlpay/core"
	"jlpay-sdk-go/pkg/jlpay/models/marketing"
	"jlpay-sdk-go/pkg/jlpay/services"
)

// MerchantActivityConfigQueryService 商户活动配置查询服务
type MerchantActivityConfigQueryService struct {
	*services.BaseService
}

// NewMerchantActivityConfigQueryService 创建新的商户活动配置查询服务
func NewMerchantActivityConfigQueryService(config *core.Config) *MerchantActivityConfigQueryService {
	return &MerchantActivityConfigQueryService{
		BaseService: services.NewBaseService(config),
	}
}

// Execute 执行商户活动配置查询请求
func (s *MerchantActivityConfigQueryService) Execute(request *marketing.MerchantActivityConfigQueryRequest) (*marketing.MerchantActivityConfigQueryResponse, error) {
	response := marketing.NewMerchantActivityConfigQueryResponse()
	err := s.Post(request, response, "/open/org/bank/act-bridge/act-merch-relation/query")
	if err != nil {
		return nil, err
	}
	return response, nil
}
